package br.com.reparoja.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "techsupport")
public class TechSupport {

	public TechSupport() {

	}

	public TechSupport(String nome, String email) {
		this();

		this.name = nome;
		this.email = email;
	}

	@Id
	@Column(unique = true)
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;

	@Column
	private String name;

	@Column
	private String email;

	@Column
	private String image;
	
	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("{");
		sb.append("\"id\": ").append(this.id).append(", ");
		sb.append("\"name\": \"").append(this.name).append("\", ");
		sb.append("\"email\": \"").append(this.email).append("\", ");
		sb.append("\"image\": \"").append(this.email).append("\"");
		sb.append("}");

		return sb.toString();
	}
	
}
